package com.qf.controller;

import com.qf.pojo.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HelloController {
    //初始化user对象
    @Resource(name = "user1")
    private User user;

    @Value("${alibaba.ip}")
    private String ip;

    @Value("${alibaba.username}")
    private String username;

    @Value("${alibaba.password}")
    private String password;
    @RequestMapping("/hello")
    public String hello(){
        System.out.println("=======" + ip);
        System.out.println("=======" + username);
        System.out.println("=======" + password);
        System.out.println("-=-=-=-=--="+user);
        return "这里是springboot的测试";
    }
}
